package com.songlanyun.modules.collect.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 用户收藏商品
 * 
 * @author zx
 * @email 
 * @date 2021-03-08 10:27:59
 */
@Data
@TableName("yxt_user_collect_goods")
public class UserCollectGoods extends RootEntity<Long,UserCollectGoods> implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 会员id
	 */
	private Long userId;
	/**
	 * 商铺id
	 */
	private Long shopId;
	/**
	 * 商品id
	 */
	@NotNull(message = "收藏商品不能为空")
	private Long goodsId;
	/**
	 * 收藏时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	@Override
	public Long getIdentity() {
		return this.id;
	}
}
